<html><head><title>ToolBarImageButton</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">ToolBarImageButton()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#3A3966"><b>ToolBarImageButton</b></font>(#Button, ImageID [, Mode])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Add an image button to the toolbar being constructed. <a href="createtoolbar.html">CreateToolBar()</a> must 
be called before to use this function. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Button</i></td>
<td width="90%"> 
The new toolbar button identifier. 

</td></tr>
<tr><td><i>ImageID</i></td>
<td> 
The image to use for the button. It can be easily obtained by using <a href="../image/imageid.html">ImageID()</a> from 
the Image library. It can be an image loaded with <a href="../image/loadimage.html">LoadImage()</a> or 
created in memory with <a href="../image/createimage.html">CreateImage()</a>. To have a real transparent background, use the 'icon' 
(.ico) file format on Windows, or the PNG file format on Linux/MacOS X. 

</td></tr>
<tr><td><i>Mode (optional)</i></td>
<td> 
The mode value can be one of the following constants: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_ToolBar_Normal</font>: the button will act as standard button (default)
  <font color="#924B72">#PB_ToolBar_Toggle</font>: the button will act as toggle button
</font></pre>
<a href="gettoolbarbuttonstate.html">GetToolBarButtonState()</a> and <a href="settoolbarbuttonstate.html">SetToolBarButtonState()</a> can be used to retrieve or modify a toggle button state. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>
None.


</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 0, 0, 150, 25, &quot;ToolBar&quot;, <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#3A3966">    CreateImage</font>(0,16,16)
<font color="#3A3966">    StartDrawing</font>(<font color="#3A3966">ImageOutput</font>(0))
<font color="#3A3966">      Box</font>(0,0,16,16,<font color="#3A3966">RGB</font>(255,255,255))
<font color="#3A3966">      Box</font>(4,4,8,8,<font color="#3A3966">RGB</font>(255,0,0))
<font color="#3A3966">    StopDrawing</font>()
<font color="#3A3966">    CreateImage</font>(1,16,16)
<font color="#3A3966">    StartDrawing</font>(<font color="#3A3966">ImageOutput</font>(1))
<font color="#3A3966">      Box</font>(0,0,16,16,<font color="#3A3966">RGB</font>(255,0,0))
<font color="#3A3966">      Box</font>(4,4,8,8,<font color="#3A3966">RGB</font>(255,255,255))
<font color="#3A3966">    StopDrawing</font>()
    <b><font color="#3A3966">If</font></b> <font color="#3A3966">CreateToolBar</font>(0,<font color="#3A3966"> WindowID</font>(0))
<font color="#3A3966">      ToolBarImageButton</font>(0,<font color="#3A3966">ImageID</font>(0))
<font color="#3A3966">      ToolBarImageButton</font>(1,<font color="#3A3966">ImageID</font>(1))
    <b><font color="#3A3966">EndIf</font></b>
    <b><font color="#3A3966">Repeat</font></b>
    <b><font color="#3A3966">Until</font></b> <font color="#3A3966">WaitWindowEvent</font>() = <font color="#924B72">#PB_Event_CloseWindow</font> 
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>
<br>
<p><img src="../HelpPictures/toolbarimagebutton.png"></p>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="createtoolbar.html">CreateToolBar()</a>, <a href="toolbarstandardbutton.html">ToolBarStandardButton()</a>, <a href="toolbarseparator.html">ToolBarSeparator()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=toolbarid.html>ToolBarID()</a> - <a href="index.html">ToolBar Index</a> - <a href="toolbarseparator.html">ToolBarSeparator()</a> -><br><br>

</body></html>